package com.snail.service;

import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.crypto.digest.DigestUtil;
import cn.hutool.json.JSONUtil;
import com.snail.config.ThirdPartyConfig;
//import com.snail.model.dto.user.BindAndLoginDTO;
import com.snail.model.dto.user.BindAndLoginDTO;
import com.snail.model.pojo.user.SysUser;
import com.snail.model.pojo.user.SysUserThird;
import com.snail.model.vo.user.LoginUser;
import com.snail.model.vo.user.LoginVO;
import com.snail.model.vo.user.ThirdPartyUserInfoVO;
import com.snail.utils.UserValidator;
import lombok.RequiredArgsConstructor;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.UUID;

/**
 * @Author 蔡徐坤
 * @Date 2025/8/15 15:36
 * @Description: TODO
 */
@Service

public interface ThirdPartyAuthService {

    /**
     * 已绑定则登录；未绑定则抛出 UNBOUND_THIRD_PARTY
     * */
    LoginVO loginByThird(String provider, String code);

    /**
     * 未绑定时专用：注册 + 绑定 + 登录
     */
    LoginVO bindAndLogin(BindAndLoginDTO bindAndLoginDTO);


}
